package cn.lyh.gulimall.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * @author lyh
 * @version 1.0
 * @since 2021/4/6
 */
@Data
@TableName(value = "mq_message")
public class MqMessage {
    @TableId(value = "message_id", type = IdType.INPUT)
    private String messageId;

    /**
     * JSON
     */
    @TableField(value = "content")
    private String content;

    @TableField(value = "to_exchange")
    private String toExchange;

    @TableField(value = "class_type")
    private String classType;

    /**
     * 0-新建 1-已发送 2-错误抵达 3-已抵达
     */
    @TableField(value = "message_status")
    private Integer messageStatus;

    @TableField(value = "create_time")
    private Date createTime;

    @TableField(value = "update_time")
    private Date updateTime;

    public static final String COL_MESSAGE_ID = "message_id";

    public static final String COL_CONTENT = "content";

    public static final String COL_TO_EXCHANGE = "to_exchange";

    public static final String COL_CLASS_TYPE = "class_type";

    public static final String COL_MESSAGE_STATUS = "message_status";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";
}